<?php

namespace app\api\model;

class User extends Base {

  public $searchFields = ['username'];

  public function checkUserExist($username, $password) {

    $result = $this->where([
      ['username', '=', $username],
      ['password', '=', md5($password)]
    ])->find();
    
    if($result) {
      return $result;
    } else {
      return false;
    }
    
  }

}